home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / man / cat.1 / gs.1 < prev    next >
Text File  |  1995-07-25  |  17KB  |  397 lines

  1.  
  2.  
  3.  
  4.      GGGGSSSS((((1111))))              UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV ((((11110000 MMMMaaaayyyy 1111999999993333))))              GGGGSSSS((((1111))))
  5.  
  6.  
  7.  
  8.      NNNNAAAAMMMMEEEE
  9.           gs - Ghostscript version 2.6 interpreter/previewer
  10.  
  11.      SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.           ggggssss [ _o_p_t_i_o_n_s ] [ _f_i_l_e_s ] ...
  13.  
  14.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  15.           Ghostscript is a programming language similar to Adobe
  16.           Systems' PostScript (tm) language, which is in turn similar
  17.           to Forth.  _G_s reads _f_i_l_e_s in sequence and executes them as
  18.           Ghostscript programs.  After doing this, it reads further
  19.           input from the standard input stream (normally the
  20.           keyboard).  Each line is interpreted separately.  To exit
  21.           from the interpreter, enter the `quit' command.  The
  22.           interpreter also exits gracefully if it encounters end-of-
  23.           file.  Typing the interrupt character (e.g. Control-C) is
  24.           also safe.
  25.  
  26.           The interpreter recognizes several switches described below,
  27.           which may appear anywhere in the command line and apply to
  28.           all files thereafter.
  29.  
  30.           You can get a help message by invoking Ghostscript with the
  31.           ----hhhh or ----???? option.  This message also lists the available
  32.           devices.
  33.  
  34.           Ghostscript may be built with multiple output devices.
  35.           Ghostscript normally opens the first one and directs output
  36.           to it.  To use device xyz as the initial output device,
  37.           include the switch
  38.                -sDEVICE=xyz
  39.           in the command line.  Note that this switch must precede the
  40.           first .ps file, and only its first invocation has any
  41.           effect.  For example, for printer output in a normal
  42.           configuration that includes an Epson printer driver, you
  43.           might use the shell command
  44.                gs -sDEVICE=epson myfile.ps
  45.           instead of just
  46.                gs myfile.ps
  47.           Alternatively, you can type
  48.                (epson) selectdevice
  49.                (myfile.ps) run
  50.           All output then goes to the printer instead of the display
  51.           until further notice.  You can switch devices at any time by
  52.           using the selectdevice procedure, e.g.,
  53.                (vga) selectdevice
  54.           or
  55.                (epson) selectdevice
  56.           As yet a third alternative, you can define an environment
  57.           variable GS_DEVICE as the desired default device name.  The
  58.           order of precedence for these alternatives, highest to
  59.           lowest, is:
  60.  
  61.  
  62.  
  63.      Page 1                                           (printed 7/3/94)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      GGGGSSSS((((1111))))              UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV ((((11110000 MMMMaaaayyyy 1111999999993333))))              GGGGSSSS((((1111))))
  71.  
  72.  
  73.  
  74.                selectdevice
  75.                (command line)
  76.                GS_DEVICE
  77.                (first device in build list)
  78.  
  79.           To select the density on a printer, use
  80.                gs -sDEVICE=<device> -r<xres>x<yres>
  81.           For example, on a 9-pin Epson-compatible printer, you can
  82.           get the lowest-density (fastest) mode with
  83.                gs -sDEVICE=epson -r60x72
  84.           and the highest-density mode with
  85.                gs -sDEVICE=epson -r240x72.
  86.  
  87.           If you select a printer as the output device, Ghostscript
  88.           also allows you to control where the device sends its
  89.           output.  Normally, output goes directly to a scratch file on
  90.           Unix systems.  To send the output to a series of files
  91.           foo1.xyz, foo2.xyz, ..., use the switch
  92.                -sOutputFile=foo%d.xyz
  93.           The %d is a printf format specification; you can use other
  94.           formats like %02d.  Each file will receive one page of
  95.           output.  Alternatively, to send the output to a single file
  96.           foo.xyz, with all the pages concatenated, use the switch
  97.                -sOutputFile=foo.xyz
  98.  
  99.           On Unix systems, you can send the output directly to a pipe.
  100.           For example, to pipe the output to the command `lpr' (which,
  101.           on many Unix systems, is the command that spools output for
  102.           a printer), use the switch
  103.                -sOutputFile=lpr
  104.           You can also send output to stdout for piping with the
  105.           switch
  106.                -sOutputFile=-
  107.           In this case you must also use the -q switch, to prevent
  108.           Ghostscript from writing messages to stdout.
  109.  
  110.           To find out what devices are available, type
  111.                devicenames ==
  112.           after starting up Ghostscript.  Alternatively, you can use
  113.           the -h or -? switch in the command line; the help message
  114.           also lists the available devices.
  115.  
  116.           When looking for the initialization files (gs_*.ps), the
  117.           files related to fonts, or the file for the `run' operator,
  118.           Ghostscript first tries opening the file with the name as
  119.           given (i.e., using the current working directory if none is
  120.           specified).  If this fails, and the file name doesn't
  121.           specify an explicit directory or drive (i.e., doesn't begin
  122.           with `/' on Unix systems), Ghostscript will try directories
  123.           in the following order:
  124.  
  125.           1.   The directory/ies specified by the -I switch(es) in the
  126.  
  127.  
  128.  
  129.      Page 2                                           (printed 7/3/94)
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.      GGGGSSSS((((1111))))              UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV ((((11110000 MMMMaaaayyyy 1111999999993333))))              GGGGSSSS((((1111))))
  137.  
  138.  
  139.  
  140.                command line (see below), if any;
  141.  
  142.           2.   The directory/ies specified by the GS_LIB environment
  143.                variable, if any;
  144.  
  145.           3.   The directory/ies specified by the GS_LIB_DEFAULT macro
  146.                in the Ghostscript makefile (which has been set to
  147.                "/usr/local/lib/ghostscript:/usr/local/lib/ghostscript/fonts").
  148.  
  149.           Each of these (GS_LIB_DEFAULT, GS_LIB, and -I parameter) may
  150.           be either a single directory, or a list of directories
  151.           separated by a `:'.
  152.  
  153.      XXXX RRRREEEESSSSOOOOUUUURRRRCCCCEEEESSSS
  154.           Ghostscript looks for the following resources under the
  155.           program name `Ghostscript':
  156.  
  157.           bbbboooorrrrddddeeeerrrrWWWWiiiiddddtttthhhh
  158.                The border width in pixels (default = 1).
  159.  
  160.           bbbboooorrrrddddeeeerrrrCCCCoooolllloooorrrr
  161.                The name of the border color (default = black).
  162.  
  163.           ggggeeeeoooommmmeeeettttrrrryyyy
  164.                The window size and placement, WxH+X+Y (default is
  165.                NULL).
  166.  
  167.           xxxxRRRReeeessssoooolllluuuuttttiiiioooonnnn
  168.                The number of x pixels per inch (default is computed
  169.                from WidthOfScreen and WidthMMOfScreen).
  170.  
  171.           yyyyRRRReeeessssoooolllluuuuttttiiiioooonnnn
  172.                The number of y pixels per inch (default is computed
  173.                from HeightOfScreen and HeightMMOfScreen).
  174.  
  175.           uuuusssseeeeBBBBaaaacccckkkkiiiinnnnggggPPPPiiiixxxxmmmmaaaapppp
  176.                Determines whether backing store is to be used for
  177.                saving display window (default = true).
  178.  
  179.           See the file `use.doc' for a more complete list of
  180.           resources.
  181.  
  182.           To set these resources, put them in a file (such as
  183.           ~/.Xresources) in the following form:
  184.  
  185.                Ghostscript*geometry:    612x792-0+0
  186.                Ghostscript*xResolution: 72
  187.                Ghostscript*yResolution: 72
  188.  
  189.           Then load the defaults into the X server:
  190.  
  191.                % xrdb -merge ~/.Xresources
  192.  
  193.  
  194.  
  195.      Page 3                                           (printed 7/3/94)
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.      GGGGSSSS((((1111))))              UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV ((((11110000 MMMMaaaayyyy 1111999999993333))))              GGGGSSSS((((1111))))
  203.  
  204.  
  205.  
  206.      OOOOPPPPTTTTIIIIOOOONNNNSSSS
  207.           -------- _f_i_l_e_n_a_m_e _a_r_g_1 ...
  208.                Takes the next argument as a file name as usual, but
  209.                takes all remaining arguments (even if they have the
  210.                syntactic form of switches) and defines the name
  211.                ARGUMENTS in userdict (not systemdict) as an array of
  212.                those strings, _b_e_f_o_r_e running the file.  When
  213.                Ghostscript finishes executing the file, it exits back
  214.                to the shell.
  215.  
  216.           ----DDDD_n_a_m_e====_t_o_k_e_n
  217.           ----dddd_n_a_m_e====_t_o_k_e_n
  218.                Define a name in systemdict with the given definition.
  219.                The token must be exactly one token (as defined by the
  220.                `token' operator) and must not contain any whitespace.
  221.  
  222.           ----DDDD_n_a_m_e
  223.           ----dddd_n_a_m_e
  224.                Define a name in systemdict with value=null.
  225.  
  226.           ----SSSS_n_a_m_e====_s_t_r_i_n_g
  227.           ----ssss_n_a_m_e====_s_t_r_i_n_g
  228.                Define a name in systemdict with a given string as
  229.                value.  This is different from -d.  For example,
  230.                -dname=35 is equivalent to the program fragment
  231.                               /name 35 def
  232.                whereas -s name=35 is equivalent to
  233.                               /name (35) def
  234.  
  235.           ----qqqq   Quiet startup - suppress normal startup messages, and
  236.                also do the equivalent of -dQUIET.
  237.  
  238.           ----gggg_n_u_m_b_e_r_1xxxx_n_u_m_b_e_r_2
  239.                Equivalent to ----ddddDDDDEEEEVVVVIIIICCCCEEEEWWWWIIIIDDDDTTTTHHHH====_n_u_m_b_e_r_1 and
  240.                ----ddddDDDDEEEEVVVVIIIICCCCEEEEHHHHEEEEIIIIGGGGHHHHTTTT====_n_u_m_b_e_r_2....  This is for the benefit of
  241.                devices (such as X11 windows) that require (or allow)
  242.                width and height to be specified.
  243.  
  244.           ----rrrr_n_u_m_b_e_r
  245.           ----rrrr_n_u_m_b_e_r_1xxxx_n_u_m_b_e_r_2
  246.                Equivalent to ----ddddDDDDEEEEVVVVIIIICCCCEEEEXXXXRRRREEEESSSSOOOOLLLLUUUUTTTTIIIIOOOONNNN====_n_u_m_b_e_r_1 and
  247.                ----ddddDDDDEEEEVVVVIIIICCCCEEEEYYYYRRRREEEESSSSOOOOLLLLUUUUTTTTIIIIOOOONNNN====_n_u_m_b_e_r_2....  This is for the benefit
  248.                of devices (such as printers) that support multiple X
  249.                and Y resolutions.  (If only one number is given, it is
  250.                used for both X and Y resolutions.)
  251.  
  252.           ----IIII_d_i_r_e_c_t_o_r_i_e_s
  253.                Adds the designated list of directories at the head of
  254.                the search path for library files.
  255.  
  256.           ----    This is not really a switch.  It indicates to
  257.                Ghostscript that the standard input is coming from a
  258.  
  259.  
  260.  
  261.      Page 4                                           (printed 7/3/94)
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.      GGGGSSSS((((1111))))              UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV ((((11110000 MMMMaaaayyyy 1111999999993333))))              GGGGSSSS((((1111))))
  269.  
  270.  
  271.  
  272.                file or a pipe.  Ghostscript reads from stdin until
  273.                reaching end-of-file, executing it like any other file,
  274.                and then continues processing the command line.  At the
  275.                end of the command line, Ghostscript exits rather than
  276.                going into its interactive mode.
  277.  
  278.           Note that gs_init.ps makes systemdict read-only, so the
  279.           values of names defined with -D/d/S/s cannot be changed
  280.           (although, of course, they can be superseded by definitions
  281.           in userdict or other dictionaries.)
  282.  
  283.      SSSSPPPPEEEECCCCIIIIAAAALLLL NNNNAAAAMMMMEEEESSSS
  284.           ----ddddDDDDIIIISSSSKKKKFFFFOOOONNNNTTTTSSSS
  285.                Causes individual character outlines to be loaded from
  286.                the disk the first time they are encountered.
  287.                (Normally Ghostscript loads all the character outlines
  288.                when it loads a font.)  This may allow loading more
  289.                fonts into RAM, at the expense of slower rendering.
  290.  
  291.           ----ddddNNNNOOOOCCCCAAAACCCCHHHHEEEE
  292.                Disables character caching.  Only useful for debugging.
  293.  
  294.           ----ddddNNNNOOOOBBBBIIIINNNNDDDD
  295.                Disables the `bind' operator.  Only useful for
  296.                debugging.
  297.  
  298.           ----ddddNNNNOOOODDDDIIIISSSSPPPPLLLLAAAAYYYY
  299.                Suppresses the normal initialization of the output
  300.                device.  This may be useful when debugging.
  301.  
  302.           ----ddddNNNNOOOOPPPPAAAAUUUUSSSSEEEE
  303.                Disables the prompt and pause at the end of each page.
  304.                This may be desirable for applications where another
  305.                program is `driving' Ghostscript.
  306.  
  307.           ----ddddNNNNOOOOPPPPLLLLAAAATTTTFFFFOOOONNNNTTTTSSSS
  308.                Disables the use of fonts supplied by the underlying
  309.                platform (e.g. X Windows).  This may be needed if the
  310.                platform fonts look undesirably different from the
  311.                scalable fonts.
  312.  
  313.           ----ddddSSSSAAAAFFFFEEEERRRR
  314.                Disables the deletefile and renamefile operators, and
  315.                the ability to open files in any mode other than read-
  316.                only.  This may be desirable for spoolers or other
  317.                sensitive environments.
  318.  
  319.           ----ddddWWWWRRRRIIIITTTTEEEESSSSYYYYSSSSTTTTEEEEMMMMDDDDIIIICCCCTTTT
  320.                Leaves systemdict writable.  This is necessary when
  321.                running special utility programs such as font2c and
  322.                pcharstr, which must bypass normal PostScript access
  323.                protection.
  324.  
  325.  
  326.  
  327.      Page 5                                           (printed 7/3/94)
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.      GGGGSSSS((((1111))))              UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV ((((11110000 MMMMaaaayyyy 1111999999993333))))              GGGGSSSS((((1111))))
  335.  
  336.  
  337.  
  338.           ----ssssDDDDEEEEVVVVIIIICCCCEEEE====_d_e_v_i_c_e
  339.                Selects an alternate initial output device, as
  340.                described above.
  341.  
  342.           ----ssssOOOOuuuuttttppppuuuuttttFFFFiiiilllleeee====_f_i_l_e_n_a_m_e
  343.                Selects an alternate output file (or pipe) for the
  344.                initial output device, as described above.
  345.  
  346.      FFFFIIIILLLLEEEESSSS
  347.           ////uuuussssrrrr////llllooooccccaaaallll////lllliiiibbbb////gggghhhhoooossssttttssssccccrrrriiiipppptttt////****
  348.                Startup-files, utilities, and basic font definitions.
  349.  
  350.           ////uuuussssrrrr////llllooooccccaaaallll////lllliiiibbbb////gggghhhhoooossssttttssssccccrrrriiiipppptttt////ffffoooonnnnttttssss////****
  351.                Additional font definitions.
  352.  
  353.           ////uuuussssrrrr////llllooooccccaaaallll////lllliiiibbbb////gggghhhhoooossssttttssssccccrrrriiiipppptttt////eeeexxxxaaaammmmpppplllleeeessss////****
  354.                Demo Ghostscript files.
  355.  
  356.           ////uuuussssrrrr////llllooooccccaaaallll////lllliiiibbbb////ddddoooocccc////gggghhhhoooossssttttssssccccrrrriiiipppptttt////ddddoooocccc////****
  357.                Assorted document files.
  358.  
  359.      SSSSEEEEEEEE AAAALLLLSSSSOOOO
  360.           The various Ghostscript document files (above).
  361.  
  362.      BBBBUUUUGGGGSSSS
  363.           See the network news group `gnu.ghostscript.bug'.
  364.  
  365.  
  366.  
  367.  
  368.  
  369.  
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.      Page 6                                           (printed 7/3/94)
  394.  
  395.  
  396.  
  397.